<template>
    <el-row>
        <el-col class="box box-pack-start padd20">
           <el-timeline>
               <el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.createDate" placement="top" class="line">
                 <el-card class="box box-tb box-pack-start box-align-start" shadow="never">
                   <h4>{{activity.name}} - {{activity.info}}</h4>
                   <p>{{activity.name}} 提交于 {{activity.createDate}}</p>
                 </el-card>
               </el-timeline-item>
             </el-timeline>
        </el-col>
    </el-row>
</template>

<script>
    export default {
        props: {
            jyzid:{
                type:Number
            }
        },
        data() {
            return {
                reverse: true,
                activities: []
            };
        },
        mounted() {
          this.logsList();
        },
        methods:{
            logsList(){
                this.$api.jyz.logsList({
                    'jyzid': this.jyzid,
                    'type':'1'
                }).then(res => {
                    if (res.code == '0') {
                        this.activities = res.list;
                    } else {
                        this.$message.error('请求失败！');
                    }
                })
            }
        }
    };
</script>

<style scoped lang="scss">
    .line>>>.el-timeline-item__wrapper, .line>>>.el-card__body{
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }



</style>
